<?php

use think\facade\Route;


Route::rest([
    'index'   => ['GET', '', 'list'],
    'read' => ['GET', '/:id', 'detail'],
    'save' => ['POST', '', 'add'],
    'update' => ['PUT', '/:id', 'edit'],
    'delete' => ['DELETE', '/:id', 'delete'],
]);


// 用户管理
Route::group('admin', function () {

    // 支付
    Route::post('pay/prepay', 'admin.Pay/prepay');

    // 分类选择
    Route::get('category/select', 'admin.Category/select');


    Route::get('dashboard/total', 'admin.Dashboard/total');
    Route::get('dashboard/chart', 'admin.Dashboard/chart');
    Route::get('dashboard/ranking', 'admin.Dashboard/ranking');
    Route::get('dashboard/getShopStatus', 'admin.Dashboard/getShopStatus');//获取店铺状态


    Route::get('store/detail', 'admin.Store/detail');
    Route::post('store/update', 'admin.Store/update');


    Route::resource('category', 'admin.category');
    Route::post('category/audit/:id', 'admin.Category/audit');

    Route::post('category/audit/:id', 'admin.Category/audit');


    Route::resource('brand', 'admin.brand');
//        Route::post('brand/audit/:id', 'admin.Brand/audit');

    // 服务团队
    Route::get('nurse/list', 'admin.Nurse/list')->name('admin.Nurse.list');
    Route::get('nurse/type_list', 'admin.Nurse/typeList')->name('admin.Nurse.typeList');
    Route::resource('nurse', 'admin.Nurse');

    Route::group(function () {



    })->middleware('check_rule', 'admin');



});
